package com.vote.entity;

public class Channel {

	private int id;
	private String title;
	private int vote_number;
	private int admin_id;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public int getVote_number() {
		return vote_number;
	}

	public void setVote_number(int vote_number) {
		this.vote_number = vote_number;
	}

	public int getAdmin_id() {
		return admin_id;
	}

	public void setAdmin_id(int admin_id) {
		this.admin_id = admin_id;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + admin_id;
		result = prime * result + id;
		result = prime * result + ((title == null) ? 0 : title.hashCode());
		result = prime * result + vote_number;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Channel other = (Channel) obj;
		if (admin_id != other.admin_id)
			return false;
		if (id != other.id)
			return false;
		if (title == null) {
			if (other.title != null)
				return false;
		} else if (!title.equals(other.title))
			return false;
		if (vote_number != other.vote_number)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Channel [id=" + id + ", title=" + title + ", vote_number=" + vote_number + ", admin_id=" + admin_id
				+ "]";
	}

	public Channel(int id, String title, int vote_number, int admin_id) {
		super();
		this.id = id;
		this.title = title;
		this.vote_number = vote_number;
		this.admin_id = admin_id;
	}

}
